<template>
    <div>
        <iframe  id="iframeContain" name="iframeContain"  :src="url" frameborder="0"></iframe>
    </div>
</template>
<script>
   import api from '../../api/index'

  export default {
    data() {
      return {
        iframedata:{
          "id":"1111"
        },
        spanClick: 'handleSpanClick' //html中需要响应的事件
      };
    },
    computed:{
      url:function(){
        return "./static/demo2.html?"+encodeURIComponent(JSON.stringify(this.iframedata))
      }
    },
    methods: {
    },
    created(){
      let _this = this
      window[this.spanClick] = (params) => {
        _this.doSomeThing(params)    
      }
    },
    mounted () {
        // this.getList()
    }
  }
</script>

<style scoped>
#iframeContain{
  background: yellowgreen;
  width: 100%;
  height: 800px;
}
</style>


